function timeMinus(time){
	if(time==0)time = 59;
	else --time;
	if(time<10){
		time="0"+time;
	}
	return time;
}
function hourMinus(time){
	if(time==0)time = 23;
	else --time;
	if(time<10){
		time="0"+time;
	}
	return time;
}
function timeChange(pretime,curtime){
	if(pretime==59){
		return timeMinus(curtime);
	}
}
function hourChange(pretime,curtime){
	if(pretime==59){
		return hourMinus(curtime);
	}
}
function dayChange(pretime,curtime){
	if(pretime==23){
		return timeMinus(curtime);
	}
}
	var second = document.querySelector("#second");
	var minute = document.querySelector("#minute");
	var hour = document.querySelector("#hour");
	var day = document.querySelector("#day");
function timeRun(){
	//秒
	var second_time = second.innerHTML;
	second_time = timeMinus(second_time);
	second.innerHTML = second_time;
	//分
	var minute_time = minute.innerHTML;
	minute_time = timeChange(second_time,minute_time)
	minute_time && (minute.innerHTML = minute_time);
	//时
	var hour_time = hour.innerHTML;
	hour_time = hourChange(minute_time,hour_time);
	hour_time && (hour.innerHTML = hour_time);
	//天
	var day_time = day.innerHTML;
	day_time = dayChange(hour_time,day_time);
	day_time && (day.innerHTML = day_time);
}
setInterval(function(){
	timeRun();
},1000)